﻿using System;
using System.Data;
using System.Collections.Generic;
namespace eTMS.DAO{
	/********************************BEGIN SoCoSinhVienDAO****************************************/
	///<summary>
	/// <para>Author: Auto generated class by CSharp Code Generator v2.0</para>
	/// <para>Date:16/08/2010 29:02:17</para>
	/// <para>Class Name: SoCoSinhVienDAO</para>
	/// <para>Description: Class access to table SoCoSinhVien in database. Class for coder code here</para>
	///</summary>

	
	public partial class SoCoSinhVienDAO{
        public DataSet SelectAllDSWithSinhVienByListSoCoSinhVien_ID(List<int>lsSoCo_ID)
        {
            IDbCommand cmd = this.CreateCommand();
            cmd.CommandText = @"SELECT        SoCoSinhVien.SoCoSinhVien_ID, SoCoSinhVien.SinhVien_ID, SoCoSinhVien.GhiChu, SoCoSinhVien.HocKy_ID, SoCoSinhVien.NamHoc_ID, SoCoSinhVien.NgayNop, 
                                                             SinhVien.MaSinhVien, SinhVien.TenSinhVien
                                FROM            SoCoSinhVien INNER JOIN
                                                             SinhVien ON SoCoSinhVien.SinhVien_ID = SinhVien.SinhVien_ID
                                WHERE SoCoSinhVien.SoCoSinhVien_ID IN(" + string.Join(",", lsSoCo_ID.ConvertAll<string>(Convert.ToString).ToArray()) + ")";
         return this.SelectDS(cmd);
        }
        public bool DeleteByKieuThanhToanNamHocHocKyListSinhVienID(int KieuThanhToan, int NamHoc_ID, int HocKy_ID, List<int> lsSinhVien_ID)
        {
            IDbCommand cmd = this.CreateCommand();
            cmd.CommandText = "DELETE FROM SoCoSinhVien WHERE KieuThanhToan=" + KieuThanhToan.ToString() + " AND NamHoc_ID=" + NamHoc_ID.ToString() + " AND HocKy_ID=" + HocKy_ID.ToString() + " AND SinhVien_ID IN(" + string.Join(",", lsSinhVien_ID.ConvertAll<string>(Convert.ToString).ToArray()) + ")";
            return this.ExcuteNoneQuery(cmd);
        }
       
	}
	/*****************************************************************************************************/
	/**********************************END SoCoSinhVienDAO*****************************************/
	/*****************************************************************************************************/
}

